

import pandas as pd
from datetime import datetime, timedelta
def toLstFromRecords(pdRecords):
    lst = []
    for item in pdRecords:
        print(item)
    return lst


# df = pd.read_excel('./demo.xls')
pdPeople = pd.read_excel('./people.xlsx')
pdRecords = pd.read_excel('./records.xlsx')

recordLst = []
cars = []
records = pdRecords[['凭证号','入场时间','出场时间']]
for index,row in records.iterrows():
    item = row.to_list()
    recordLst.append(item)
    if item[0] not in cars:
        cars.append([item[0]])

for car in cars:
    for records in recordLst:
        if car[0]==records[0]:
            print(records)
